//
//  AppConstants.h
//  cleancar
//
//  Created by wangfang on 14-10-14.
//  Copyright (c) 2014年 edaijia-inc. All rights reserved.
//

#ifndef cleancar_AppConstants_h
#define cleancar_AppConstants_h

//订单相关的宏
#define kNotificationOrderDriverReceived    @"NotificationOrderDriverReceived"
#define kNotificationOrderDriverRejected    @"NotificationOrderDriverRejected"
#define kNotificationOrderDriverCanceled    @"NotificationOrderDriverCanceled"
#define kNotificationOrderDriverInPlace     @"NotificationOrderDriverInPlace"

#define kNotificationAliPaySuccess    @"NotificationAliPaySuccess"

#define kNotificationGoToHeroList     @"kNotificationGoToHeroList"
#define kNotificationGoToInstituteList     @"kNotificationGoToInstituteList"

/// 个推开发者网站中申请App时，注册的AppId、AppKey、AppSecret
#define kGtAppId           @"UtTXIaLJbO8vVdbX7NyDC3"
#define kGtAppKey          @"EtNY3IMr59AkQzvK3Qhio4"
#define kGtAppSecret       @"L0rBpoLaeU9iKQeP1x2ej1"

#define kUMAppKey @"59523587f43e48562a000b1c"

#define kAddToCartSuccess @"kAddToCartSuccess"

typedef NS_ENUM(NSInteger, ZYJRegionType){
    ZYJCityType,
    ZYJCountryType
};

typedef NS_ENUM(NSInteger, ZYJOrderListType) {
    ZYJOrderListAllType = 1,
    ZYJOrderListWaitPayOrWaitConfirmType = 2,
    ZYJOrderListWaitDoType = 3,
    ZYJOrderListWaitCommentOrHadDoType = 4,
};

//1、order_status：订单状态 1待确认 2确认通过 3确认不通过 4取消订单 5完成订单（付款成功，并且执行了） 6过期订单
//
//2、zhixing_status：执行状态 0 无状态（在支付之前） 1执行了 2待执行 3未执行
//
//3、pay_status：支付状态 0无状态（在确认订单之前） 1付款了 2待付款 3未付款
//
//4、reply_status：评价状态 0无状态（在执行了之前） 1评价了 2待评价


typedef NS_ENUM(NSInteger,EShareType) {
    EShareTypeWx = 0,//微信
    EShareTypeCircle = 1,//微信朋友圈
    EShareTypeWb = 2//微博
};

typedef NS_ENUM(NSInteger,ICMeetListType) {
    ICMeetListMeetType = 1,
    ICMeetListMeetedType = 2,
};


typedef NS_ENUM(NSInteger,EPageType) {
    EHostFollowInvestorPage,
    EFollowMePage,
    EInterestMyProjectPage
};

typedef NS_ENUM(NSInteger,EPayType) {
    EWXinPay = 1,
    EAliPay
};

typedef NS_ENUM(NSInteger,EPasswordPageType) {
    ERegisterPage,
    EFindPasswordPage,
    EModifyPasswordPage
};

typedef NS_ENUM(NSInteger,EMessageType) {
    EFollowHostType = 1,
    EFollowProjectType,
    EPayProjectType,
    EPayHostType
};

typedef NS_ENUM(NSInteger,ELevelType) {
    ENormalType = 1,
    EIdetifierType,
    EStarType
};

typedef NS_ENUM(NSInteger,EIdetifierStatusType) {
    ENotIdetifierStatusType = 1,
    EIdetifieringStatusType ,
    EIdetifieredStatusType
}; 

static NSString *EFWXScope = @"snsapi_userinfo";
static NSString *EFWXState = @"enjoyfoodLogin";
static NSString *EFWXAppId = @"wxcbe0e928545754a4";
static NSString *EFWXSecretKey = @"5b50a8c5ca0b1d5a83eed3b658bed363";

typedef NS_ENUM(NSInteger,EPositionType) {
    EHeadPositionType,
    EMiddlePositionType,
    EEndPositionType
};

typedef NS_ENUM(NSInteger,EProjectCheckType) {
    ECheckingType = 0,
    ECheckFailedType,
    ECheckSuccessType
};
 

#define iPhone5 kScreenHeight == 568 ? YES : NO
#define iPhone6AndLater kScreenHeight >= 667.f ? YES : NO
#define iPhone6Plus  kScreenHeight >= 736 ? YES : NO
#define AutoSizeScaleY 736.f/667.f

#define kScreenWidth [UIScreen mainScreen].bounds.size.width
#define kScreenHeight [UIScreen mainScreen].bounds.size.height
#define kStatusBarHeight 64.0
#define kTabBarHeight 49.f

#define scale(x) ceil((x)*(kScreenWidth/375.0)/2) //4.7inch scale

#define EFRectMake(x,y,w,h) CGRectMake(scale(x), scale(y), scale(w), scale(h))


#define ORDER_MAX_SHOW_COUNT 2
#define TRANS_HOME_MAX_SHOW_COUNT 3

//推荐路线的宏
#define kRecommendLineWidth 600.f
#define kRecommendLineHeight 280.f

#define kViewControllerBgColor RGBCOLOR(0xF5F5F5)

#define kBlack333 RGBCOLOR(0x333333)
#define kBlack666 RGBCOLOR(0x666666)
#define kBlack999 RGBCOLOR(0x999999)
#define kBlackDDD RGBCOLOR(0xDDDDDD)
#define kBlack141414 RGBCOLOR(0x141414)
#define kBlack6C6C7D RGBCOLOR(0x6C6C7D)
#define kDarkBlueColor RGBCOLOR(0x2A3657)
#define kLineColor RGBCOLOR(0x3d3d4e)
#define kGrayLineColor RGBCOLOR(0xCDCDCD)
#define kDarkGrayColor [UIColor darkGrayColor]
#define kOrangeColor RGBCOLOR(0xFF9A00)
#define kYellowColor RGBCOLOR(0xDCB414)
#define kDarkOrangeColor RGBCOLOR(0xF76120)
#define kGreenColor RGBCOLOR(0x76b75a)
#define kDarkGreenColor RGBCOLOR(0x2C9A9B)
#define kBlueColor RGBCOLOR(0x0195FF)
#define kDarkBlueColor RGBCOLOR(0x2A3657)
#define kNavigationItemTitleColor RGBCOLOR(0x2A3040)

#define kNewGreenColor RGBCOLOR(0x06D1B0)
#define kNewLineColor RGBCOLOR(0xD8D8D8)

#define kGrayColor RGBCOLOR(0xcccccc)
#define kTextGreenColor RGBCOLOR(0x69ba45)
#define kTextGrayColor RGBCOLOR(0xcccccc)

#define  kMAXDISPATCHTIME 3600.f
#define  kMAXPAYTIME  600.f

#define kNotificationAliPaySuccess    @"NotificationAliPaySuccess"
#define kNotificationWeixinPaySuccess @"NotificationWeixinPaySuccess"


#define IOS10_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 10.0)

#define IOS9_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 9.0)

#define IOS8_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)

#define IOS7_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)

#define IOS7_OR_EARLYER [[[UIDevice currentDevice] systemVersion] floatValue] < 8.0

#define IOS6_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 6.0)

#define IOS6_OR_EARLYER [[[UIDevice currentDevice] systemVersion] floatValue] < 7.0
#endif
